﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Globalization;

namespace Nut.utils
{
    public class BasicInformation
    {
        public static String defaultTmpDir = "C:/TMP";
        public static String defaultTag = "";
        /// <summary>
        /// 获取临时目录下考试系统工作目录
        /// </summary>
        /// <returns></returns>
        public static String getTempDir()
        {
            String rs = "";
            //rs = Environment.GetEnvironmentVariable("TEMP");
            //if (StringCookie.trim(rs).Equals(""))
            //{
            //    rs = Environment.GetEnvironmentVariable("TMP");
            //}
            if (StringCookie.trim(rs).Equals(""))
            {
                rs = defaultTmpDir;
                FileCookie.CreateDirYes(rs);
                

            }
            else
            {
                rs += "/PaperTemp";
                FileCookie.CreateDirYes(rs);
            }

            return rs;


        }
        /// <summary>
        /// 获取临时目录下考试系统工作目录下的时点目录
        /// </summary>
        /// <returns></returns>
        public static String getTempSubDir()
        {
            String rs = "";
            rs = getTempDir() + "/" +defaultTag+"/";
            FileCookie.CreateDirYes(rs);

            return rs;


        }
       

       
    }
}
